﻿using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace MuHelper.Tests
{
    [TestClass]
    public class NumberWithMeasureNegate
    {
        [TestMethod]
        public void Negate()
        {
            var measure1 = new Measure("m");
            var value1 = new NumberWithMeasure(5, measure1);

            var value2 = -value1;

            Assert.AreEqual(-5, value2.Value);
            Assert.AreEqual(value2.Measure, measure1);
        }

        [TestMethod]
        public void NegateNaN()
        {
            var result = -NumberWithMeasure.NaN;
            Assert.AreEqual(result, NumberWithMeasure.NaN);
        }
    }
}
